↳ Prolog
↳ PrologToPiTRSProof
prime_in(s(s(X))) → U4(X, pr_in(s(s(X)), s(X)))
pr_in(X, s(s(Y))) → U5(X, Y, not_divides_in(s(s(Y)), X))
not_divides_in(Y, X) → U7(Y, X, div_in(X, Y, U))
div_in(X, Y, Z) → U1(X, Y, Z, quot_in(X, Y, Y, Z))
quot_in(X, 0, s(Z), s(U)) → U3(X, Z, U, quot_in(X, s(Z), s(Z), U))
quot_in(s(X), s(Y), Z, U) → U2(X, Y, Z, U, quot_in(X, Y, Z, U))
quot_in(0, s(Y), s(Z), 0) → quot_out(0, s(Y), s(Z), 0)
U2(X, Y, Z, U, quot_out(X, Y, Z, U)) → quot_out(s(X), s(Y), Z, U)
U3(X, Z, U, quot_out(X, s(Z), s(Z), U)) → quot_out(X, 0, s(Z), s(U))
U1(X, Y, Z, quot_out(X, Y, Y, Z)) → div_out(X, Y, Z)
U7(Y, X, div_out(X, Y, U)) → U8(Y, X, times_in(U, Y, Z))
times_in(s(X), Y, Z) → U11(X, Y, Z, times_in(X, Y, U))
times_in(0, Y, 0) → times_out(0, Y, 0)
U11(X, Y, Z, times_out(X, Y, U)) → U12(X, Y, Z, add_in(U, Y, Z))
add_in(s(X), Y, s(Z)) → U13(X, Y, Z, add_in(X, Y, Z))
add_in(0, X, X) → add_out(0, X, X)
add_in(X, 0, X) → add_out(X, 0, X)
U13(X, Y, Z, add_out(X, Y, Z)) → add_out(s(X), Y, s(Z))
U12(X, Y, Z, add_out(U, Y, Z)) → times_out(s(X), Y, Z)
U8(Y, X, times_out(U, Y, Z)) → U9(Y, X, neq_in(X, Z))
neq_in(s(X), s(Y)) → U10(X, Y, neq_in(X, Y))
neq_in(0, s(X)) → neq_out(0, s(X))
neq_in(s(X), 0) → neq_out(s(X), 0)
U10(X, Y, neq_out(X, Y)) → neq_out(s(X), s(Y))
U9(Y, X, neq_out(X, Z)) → not_divides_out(Y, X)
U5(X, Y, not_divides_out(s(s(Y)), X)) → U6(X, Y, pr_in(X, s(Y)))
pr_in(X, s(0)) → pr_out(X, s(0))
U6(X, Y, pr_out(X, s(Y))) → pr_out(X, s(s(Y)))
U4(X, pr_out(s(s(X)), s(X))) → prime_out(s(s(X)))
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
prime_in(s(s(X))) → U4(X, pr_in(s(s(X)), s(X)))
pr_in(X, s(s(Y))) → U5(X, Y, not_divides_in(s(s(Y)), X))
not_divides_in(Y, X) → U7(Y, X, div_in(X, Y, U))
div_in(X, Y, Z) → U1(X, Y, Z, quot_in(X, Y, Y, Z))
quot_in(X, 0, s(Z), s(U)) → U3(X, Z, U, quot_in(X, s(Z), s(Z), U))
quot_in(s(X), s(Y), Z, U) → U2(X, Y, Z, U, quot_in(X, Y, Z, U))
quot_in(0, s(Y), s(Z), 0) → quot_out(0, s(Y), s(Z), 0)
U2(X, Y, Z, U, quot_out(X, Y, Z, U)) → quot_out(s(X), s(Y), Z, U)
U3(X, Z, U, quot_out(X, s(Z), s(Z), U)) → quot_out(X, 0, s(Z), s(U))
U1(X, Y, Z, quot_out(X, Y, Y, Z)) → div_out(X, Y, Z)
U7(Y, X, div_out(X, Y, U)) → U8(Y, X, times_in(U, Y, Z))
times_in(s(X), Y, Z) → U11(X, Y, Z, times_in(X, Y, U))
times_in(0, Y, 0) → times_out(0, Y, 0)
U11(X, Y, Z, times_out(X, Y, U)) → U12(X, Y, Z, add_in(U, Y, Z))
add_in(s(X), Y, s(Z)) → U13(X, Y, Z, add_in(X, Y, Z))
add_in(0, X, X) → add_out(0, X, X)
add_in(X, 0, X) → add_out(X, 0, X)
U13(X, Y, Z, add_out(X, Y, Z)) → add_out(s(X), Y, s(Z))
U12(X, Y, Z, add_out(U, Y, Z)) → times_out(s(X), Y, Z)
U8(Y, X, times_out(U, Y, Z)) → U9(Y, X, neq_in(X, Z))
neq_in(s(X), s(Y)) → U10(X, Y, neq_in(X, Y))
neq_in(0, s(X)) → neq_out(0, s(X))
neq_in(s(X), 0) → neq_out(s(X), 0)
U10(X, Y, neq_out(X, Y)) → neq_out(s(X), s(Y))
U9(Y, X, neq_out(X, Z)) → not_divides_out(Y, X)
U5(X, Y, not_divides_out(s(s(Y)), X)) → U6(X, Y, pr_in(X, s(Y)))
pr_in(X, s(0)) → pr_out(X, s(0))
U6(X, Y, pr_out(X, s(Y))) → pr_out(X, s(s(Y)))
U4(X, pr_out(s(s(X)), s(X))) → prime_out(s(s(X)))
PRIME_IN(s(s(X))) → U41(X, pr_in(s(s(X)), s(X)))
PRIME_IN(s(s(X))) → PR_IN(s(s(X)), s(X))
PR_IN(X, s(s(Y))) → U51(X, Y, not_divides_in(s(s(Y)), X))
PR_IN(X, s(s(Y))) → NOT_DIVIDES_IN(s(s(Y)), X)
NOT_DIVIDES_IN(Y, X) → U71(Y, X, div_in(X, Y, U))
NOT_DIVIDES_IN(Y, X) → DIV_IN(X, Y, U)
DIV_IN(X, Y, Z) → U11(X, Y, Z, quot_in(X, Y, Y, Z))
DIV_IN(X, Y, Z) → QUOT_IN(X, Y, Y, Z)
QUOT_IN(X, 0, s(Z), s(U)) → U31(X, Z, U, quot_in(X, s(Z), s(Z), U))
QUOT_IN(X, 0, s(Z), s(U)) → QUOT_IN(X, s(Z), s(Z), U)
QUOT_IN(s(X), s(Y), Z, U) → U21(X, Y, Z, U, quot_in(X, Y, Z, U))
QUOT_IN(s(X), s(Y), Z, U) → QUOT_IN(X, Y, Z, U)
U71(Y, X, div_out(X, Y, U)) → U81(Y, X, times_in(U, Y, Z))
U71(Y, X, div_out(X, Y, U)) → TIMES_IN(U, Y, Z)
TIMES_IN(s(X), Y, Z) → U111(X, Y, Z, times_in(X, Y, U))
TIMES_IN(s(X), Y, Z) → TIMES_IN(X, Y, U)
U111(X, Y, Z, times_out(X, Y, U)) → U121(X, Y, Z, add_in(U, Y, Z))
U111(X, Y, Z, times_out(X, Y, U)) → ADD_IN(U, Y, Z)
ADD_IN(s(X), Y, s(Z)) → U131(X, Y, Z, add_in(X, Y, Z))
ADD_IN(s(X), Y, s(Z)) → ADD_IN(X, Y, Z)
U81(Y, X, times_out(U, Y, Z)) → U91(Y, X, neq_in(X, Z))
U81(Y, X, times_out(U, Y, Z)) → NEQ_IN(X, Z)
NEQ_IN(s(X), s(Y)) → U101(X, Y, neq_in(X, Y))
NEQ_IN(s(X), s(Y)) → NEQ_IN(X, Y)
U51(X, Y, not_divides_out(s(s(Y)), X)) → U61(X, Y, pr_in(X, s(Y)))
U51(X, Y, not_divides_out(s(s(Y)), X)) → PR_IN(X, s(Y))
prime_in(s(s(X))) → U4(X, pr_in(s(s(X)), s(X)))
pr_in(X, s(s(Y))) → U5(X, Y, not_divides_in(s(s(Y)), X))
not_divides_in(Y, X) → U7(Y, X, div_in(X, Y, U))
div_in(X, Y, Z) → U1(X, Y, Z, quot_in(X, Y, Y, Z))
quot_in(X, 0, s(Z), s(U)) → U3(X, Z, U, quot_in(X, s(Z), s(Z), U))
quot_in(s(X), s(Y), Z, U) → U2(X, Y, Z, U, quot_in(X, Y, Z, U))
quot_in(0, s(Y), s(Z), 0) → quot_out(0, s(Y), s(Z), 0)
U2(X, Y, Z, U, quot_out(X, Y, Z, U)) → quot_out(s(X), s(Y), Z, U)
U3(X, Z, U, quot_out(X, s(Z), s(Z), U)) → quot_out(X, 0, s(Z), s(U))
U1(X, Y, Z, quot_out(X, Y, Y, Z)) → div_out(X, Y, Z)
U7(Y, X, div_out(X, Y, U)) → U8(Y, X, times_in(U, Y, Z))
times_in(s(X), Y, Z) → U11(X, Y, Z, times_in(X, Y, U))
times_in(0, Y, 0) → times_out(0, Y, 0)
U11(X, Y, Z, times_out(X, Y, U)) → U12(X, Y, Z, add_in(U, Y, Z))
add_in(s(X), Y, s(Z)) → U13(X, Y, Z, add_in(X, Y, Z))
add_in(0, X, X) → add_out(0, X, X)
add_in(X, 0, X) → add_out(X, 0, X)
U13(X, Y, Z, add_out(X, Y, Z)) → add_out(s(X), Y, s(Z))
U12(X, Y, Z, add_out(U, Y, Z)) → times_out(s(X), Y, Z)
U8(Y, X, times_out(U, Y, Z)) → U9(Y, X, neq_in(X, Z))
neq_in(s(X), s(Y)) → U10(X, Y, neq_in(X, Y))
neq_in(0, s(X)) → neq_out(0, s(X))
neq_in(s(X), 0) → neq_out(s(X), 0)
U10(X, Y, neq_out(X, Y)) → neq_out(s(X), s(Y))
U9(Y, X, neq_out(X, Z)) → not_divides_out(Y, X)
U5(X, Y, not_divides_out(s(s(Y)), X)) → U6(X, Y, pr_in(X, s(Y)))
pr_in(X, s(0)) → pr_out(X, s(0))
U6(X, Y, pr_out(X, s(Y))) → pr_out(X, s(s(Y)))
U4(X, pr_out(s(s(X)), s(X))) → prime_out(s(s(X)))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
PRIME_IN(s(s(X))) → U41(X, pr_in(s(s(X)), s(X)))
PRIME_IN(s(s(X))) → PR_IN(s(s(X)), s(X))
PR_IN(X, s(s(Y))) → U51(X, Y, not_divides_in(s(s(Y)), X))
PR_IN(X, s(s(Y))) → NOT_DIVIDES_IN(s(s(Y)), X)
NOT_DIVIDES_IN(Y, X) → U71(Y, X, div_in(X, Y, U))
NOT_DIVIDES_IN(Y, X) → DIV_IN(X, Y, U)
DIV_IN(X, Y, Z) → U11(X, Y, Z, quot_in(X, Y, Y, Z))
DIV_IN(X, Y, Z) → QUOT_IN(X, Y, Y, Z)
QUOT_IN(X, 0, s(Z), s(U)) → U31(X, Z, U, quot_in(X, s(Z), s(Z), U))
QUOT_IN(X, 0, s(Z), s(U)) → QUOT_IN(X, s(Z), s(Z), U)
QUOT_IN(s(X), s(Y), Z, U) → U21(X, Y, Z, U, quot_in(X, Y, Z, U))
QUOT_IN(s(X), s(Y), Z, U) → QUOT_IN(X, Y, Z, U)
U71(Y, X, div_out(X, Y, U)) → U81(Y, X, times_in(U, Y, Z))
U71(Y, X, div_out(X, Y, U)) → TIMES_IN(U, Y, Z)
TIMES_IN(s(X), Y, Z) → U111(X, Y, Z, times_in(X, Y, U))
TIMES_IN(s(X), Y, Z) → TIMES_IN(X, Y, U)
U111(X, Y, Z, times_out(X, Y, U)) → U121(X, Y, Z, add_in(U, Y, Z))
U111(X, Y, Z, times_out(X, Y, U)) → ADD_IN(U, Y, Z)
ADD_IN(s(X), Y, s(Z)) → U131(X, Y, Z, add_in(X, Y, Z))
ADD_IN(s(X), Y, s(Z)) → ADD_IN(X, Y, Z)
U81(Y, X, times_out(U, Y, Z)) → U91(Y, X, neq_in(X, Z))
U81(Y, X, times_out(U, Y, Z)) → NEQ_IN(X, Z)
NEQ_IN(s(X), s(Y)) → U101(X, Y, neq_in(X, Y))
NEQ_IN(s(X), s(Y)) → NEQ_IN(X, Y)
U51(X, Y, not_divides_out(s(s(Y)), X)) → U61(X, Y, pr_in(X, s(Y)))
U51(X, Y, not_divides_out(s(s(Y)), X)) → PR_IN(X, s(Y))
prime_in(s(s(X))) → U4(X, pr_in(s(s(X)), s(X)))
pr_in(X, s(s(Y))) → U5(X, Y, not_divides_in(s(s(Y)), X))
not_divides_in(Y, X) → U7(Y, X, div_in(X, Y, U))
div_in(X, Y, Z) → U1(X, Y, Z, quot_in(X, Y, Y, Z))
quot_in(X, 0, s(Z), s(U)) → U3(X, Z, U, quot_in(X, s(Z), s(Z), U))
quot_in(s(X), s(Y), Z, U) → U2(X, Y, Z, U, quot_in(X, Y, Z, U))
quot_in(0, s(Y), s(Z), 0) → quot_out(0, s(Y), s(Z), 0)
U2(X, Y, Z, U, quot_out(X, Y, Z, U)) → quot_out(s(X), s(Y), Z, U)
U3(X, Z, U, quot_out(X, s(Z), s(Z), U)) → quot_out(X, 0, s(Z), s(U))
U1(X, Y, Z, quot_out(X, Y, Y, Z)) → div_out(X, Y, Z)
U7(Y, X, div_out(X, Y, U)) → U8(Y, X, times_in(U, Y, Z))
times_in(s(X), Y, Z) → U11(X, Y, Z, times_in(X, Y, U))
times_in(0, Y, 0) → times_out(0, Y, 0)
U11(X, Y, Z, times_out(X, Y, U)) → U12(X, Y, Z, add_in(U, Y, Z))
add_in(s(X), Y, s(Z)) → U13(X, Y, Z, add_in(X, Y, Z))
add_in(0, X, X) → add_out(0, X, X)
add_in(X, 0, X) → add_out(X, 0, X)
U13(X, Y, Z, add_out(X, Y, Z)) → add_out(s(X), Y, s(Z))
U12(X, Y, Z, add_out(U, Y, Z)) → times_out(s(X), Y, Z)
U8(Y, X, times_out(U, Y, Z)) → U9(Y, X, neq_in(X, Z))
neq_in(s(X), s(Y)) → U10(X, Y, neq_in(X, Y))
neq_in(0, s(X)) → neq_out(0, s(X))
neq_in(s(X), 0) → neq_out(s(X), 0)
U10(X, Y, neq_out(X, Y)) → neq_out(s(X), s(Y))
U9(Y, X, neq_out(X, Z)) → not_divides_out(Y, X)
U5(X, Y, not_divides_out(s(s(Y)), X)) → U6(X, Y, pr_in(X, s(Y)))
pr_in(X, s(0)) → pr_out(X, s(0))
U6(X, Y, pr_out(X, s(Y))) → pr_out(X, s(s(Y)))
U4(X, pr_out(s(s(X)), s(X))) → prime_out(s(s(X)))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
NEQ_IN(s(X), s(Y)) → NEQ_IN(X, Y)
prime_in(s(s(X))) → U4(X, pr_in(s(s(X)), s(X)))
pr_in(X, s(s(Y))) → U5(X, Y, not_divides_in(s(s(Y)), X))
not_divides_in(Y, X) → U7(Y, X, div_in(X, Y, U))
div_in(X, Y, Z) → U1(X, Y, Z, quot_in(X, Y, Y, Z))
quot_in(X, 0, s(Z), s(U)) → U3(X, Z, U, quot_in(X, s(Z), s(Z), U))
quot_in(s(X), s(Y), Z, U) → U2(X, Y, Z, U, quot_in(X, Y, Z, U))
quot_in(0, s(Y), s(Z), 0) → quot_out(0, s(Y), s(Z), 0)
U2(X, Y, Z, U, quot_out(X, Y, Z, U)) → quot_out(s(X), s(Y), Z, U)
U3(X, Z, U, quot_out(X, s(Z), s(Z), U)) → quot_out(X, 0, s(Z), s(U))
U1(X, Y, Z, quot_out(X, Y, Y, Z)) → div_out(X, Y, Z)
U7(Y, X, div_out(X, Y, U)) → U8(Y, X, times_in(U, Y, Z))
times_in(s(X), Y, Z) → U11(X, Y, Z, times_in(X, Y, U))
times_in(0, Y, 0) → times_out(0, Y, 0)
U11(X, Y, Z, times_out(X, Y, U)) → U12(X, Y, Z, add_in(U, Y, Z))
add_in(s(X), Y, s(Z)) → U13(X, Y, Z, add_in(X, Y, Z))
add_in(0, X, X) → add_out(0, X, X)
add_in(X, 0, X) → add_out(X, 0, X)
U13(X, Y, Z, add_out(X, Y, Z)) → add_out(s(X), Y, s(Z))
U12(X, Y, Z, add_out(U, Y, Z)) → times_out(s(X), Y, Z)
U8(Y, X, times_out(U, Y, Z)) → U9(Y, X, neq_in(X, Z))
neq_in(s(X), s(Y)) → U10(X, Y, neq_in(X, Y))
neq_in(0, s(X)) → neq_out(0, s(X))
neq_in(s(X), 0) → neq_out(s(X), 0)
U10(X, Y, neq_out(X, Y)) → neq_out(s(X), s(Y))
U9(Y, X, neq_out(X, Z)) → not_divides_out(Y, X)
U5(X, Y, not_divides_out(s(s(Y)), X)) → U6(X, Y, pr_in(X, s(Y)))
pr_in(X, s(0)) → pr_out(X, s(0))
U6(X, Y, pr_out(X, s(Y))) → pr_out(X, s(s(Y)))
U4(X, pr_out(s(s(X)), s(X))) → prime_out(s(s(X)))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
NEQ_IN(s(X), s(Y)) → NEQ_IN(X, Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
NEQ_IN(s(X), s(Y)) → NEQ_IN(X, Y)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
ADD_IN(s(X), Y, s(Z)) → ADD_IN(X, Y, Z)
prime_in(s(s(X))) → U4(X, pr_in(s(s(X)), s(X)))
pr_in(X, s(s(Y))) → U5(X, Y, not_divides_in(s(s(Y)), X))
not_divides_in(Y, X) → U7(Y, X, div_in(X, Y, U))
div_in(X, Y, Z) → U1(X, Y, Z, quot_in(X, Y, Y, Z))
quot_in(X, 0, s(Z), s(U)) → U3(X, Z, U, quot_in(X, s(Z), s(Z), U))
quot_in(s(X), s(Y), Z, U) → U2(X, Y, Z, U, quot_in(X, Y, Z, U))
quot_in(0, s(Y), s(Z), 0) → quot_out(0, s(Y), s(Z), 0)
U2(X, Y, Z, U, quot_out(X, Y, Z, U)) → quot_out(s(X), s(Y), Z, U)
U3(X, Z, U, quot_out(X, s(Z), s(Z), U)) → quot_out(X, 0, s(Z), s(U))
U1(X, Y, Z, quot_out(X, Y, Y, Z)) → div_out(X, Y, Z)
U7(Y, X, div_out(X, Y, U)) → U8(Y, X, times_in(U, Y, Z))
times_in(s(X), Y, Z) → U11(X, Y, Z, times_in(X, Y, U))
times_in(0, Y, 0) → times_out(0, Y, 0)
U11(X, Y, Z, times_out(X, Y, U)) → U12(X, Y, Z, add_in(U, Y, Z))
add_in(s(X), Y, s(Z)) → U13(X, Y, Z, add_in(X, Y, Z))
add_in(0, X, X) → add_out(0, X, X)
add_in(X, 0, X) → add_out(X, 0, X)
U13(X, Y, Z, add_out(X, Y, Z)) → add_out(s(X), Y, s(Z))
U12(X, Y, Z, add_out(U, Y, Z)) → times_out(s(X), Y, Z)
U8(Y, X, times_out(U, Y, Z)) → U9(Y, X, neq_in(X, Z))
neq_in(s(X), s(Y)) → U10(X, Y, neq_in(X, Y))
neq_in(0, s(X)) → neq_out(0, s(X))
neq_in(s(X), 0) → neq_out(s(X), 0)
U10(X, Y, neq_out(X, Y)) → neq_out(s(X), s(Y))
U9(Y, X, neq_out(X, Z)) → not_divides_out(Y, X)
U5(X, Y, not_divides_out(s(s(Y)), X)) → U6(X, Y, pr_in(X, s(Y)))
pr_in(X, s(0)) → pr_out(X, s(0))
U6(X, Y, pr_out(X, s(Y))) → pr_out(X, s(s(Y)))
U4(X, pr_out(s(s(X)), s(X))) → prime_out(s(s(X)))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
ADD_IN(s(X), Y, s(Z)) → ADD_IN(X, Y, Z)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
↳ PiDP
ADD_IN(s(X), Y) → ADD_IN(X, Y)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
TIMES_IN(s(X), Y, Z) → TIMES_IN(X, Y, U)
prime_in(s(s(X))) → U4(X, pr_in(s(s(X)), s(X)))
pr_in(X, s(s(Y))) → U5(X, Y, not_divides_in(s(s(Y)), X))
not_divides_in(Y, X) → U7(Y, X, div_in(X, Y, U))
div_in(X, Y, Z) → U1(X, Y, Z, quot_in(X, Y, Y, Z))
quot_in(X, 0, s(Z), s(U)) → U3(X, Z, U, quot_in(X, s(Z), s(Z), U))
quot_in(s(X), s(Y), Z, U) → U2(X, Y, Z, U, quot_in(X, Y, Z, U))
quot_in(0, s(Y), s(Z), 0) → quot_out(0, s(Y), s(Z), 0)
U2(X, Y, Z, U, quot_out(X, Y, Z, U)) → quot_out(s(X), s(Y), Z, U)
U3(X, Z, U, quot_out(X, s(Z), s(Z), U)) → quot_out(X, 0, s(Z), s(U))
U1(X, Y, Z, quot_out(X, Y, Y, Z)) → div_out(X, Y, Z)
U7(Y, X, div_out(X, Y, U)) → U8(Y, X, times_in(U, Y, Z))
times_in(s(X), Y, Z) → U11(X, Y, Z, times_in(X, Y, U))
times_in(0, Y, 0) → times_out(0, Y, 0)
U11(X, Y, Z, times_out(X, Y, U)) → U12(X, Y, Z, add_in(U, Y, Z))
add_in(s(X), Y, s(Z)) → U13(X, Y, Z, add_in(X, Y, Z))
add_in(0, X, X) → add_out(0, X, X)
add_in(X, 0, X) → add_out(X, 0, X)
U13(X, Y, Z, add_out(X, Y, Z)) → add_out(s(X), Y, s(Z))
U12(X, Y, Z, add_out(U, Y, Z)) → times_out(s(X), Y, Z)
U8(Y, X, times_out(U, Y, Z)) → U9(Y, X, neq_in(X, Z))
neq_in(s(X), s(Y)) → U10(X, Y, neq_in(X, Y))
neq_in(0, s(X)) → neq_out(0, s(X))
neq_in(s(X), 0) → neq_out(s(X), 0)
U10(X, Y, neq_out(X, Y)) → neq_out(s(X), s(Y))
U9(Y, X, neq_out(X, Z)) → not_divides_out(Y, X)
U5(X, Y, not_divides_out(s(s(Y)), X)) → U6(X, Y, pr_in(X, s(Y)))
pr_in(X, s(0)) → pr_out(X, s(0))
U6(X, Y, pr_out(X, s(Y))) → pr_out(X, s(s(Y)))
U4(X, pr_out(s(s(X)), s(X))) → prime_out(s(s(X)))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
TIMES_IN(s(X), Y, Z) → TIMES_IN(X, Y, U)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
TIMES_IN(s(X), Y) → TIMES_IN(X, Y)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
QUOT_IN(s(X), s(Y), Z, U) → QUOT_IN(X, Y, Z, U)
QUOT_IN(X, 0, s(Z), s(U)) → QUOT_IN(X, s(Z), s(Z), U)
prime_in(s(s(X))) → U4(X, pr_in(s(s(X)), s(X)))
pr_in(X, s(s(Y))) → U5(X, Y, not_divides_in(s(s(Y)), X))
not_divides_in(Y, X) → U7(Y, X, div_in(X, Y, U))
div_in(X, Y, Z) → U1(X, Y, Z, quot_in(X, Y, Y, Z))
quot_in(X, 0, s(Z), s(U)) → U3(X, Z, U, quot_in(X, s(Z), s(Z), U))
quot_in(s(X), s(Y), Z, U) → U2(X, Y, Z, U, quot_in(X, Y, Z, U))
quot_in(0, s(Y), s(Z), 0) → quot_out(0, s(Y), s(Z), 0)
U2(X, Y, Z, U, quot_out(X, Y, Z, U)) → quot_out(s(X), s(Y), Z, U)
U3(X, Z, U, quot_out(X, s(Z), s(Z), U)) → quot_out(X, 0, s(Z), s(U))
U1(X, Y, Z, quot_out(X, Y, Y, Z)) → div_out(X, Y, Z)
U7(Y, X, div_out(X, Y, U)) → U8(Y, X, times_in(U, Y, Z))
times_in(s(X), Y, Z) → U11(X, Y, Z, times_in(X, Y, U))
times_in(0, Y, 0) → times_out(0, Y, 0)
U11(X, Y, Z, times_out(X, Y, U)) → U12(X, Y, Z, add_in(U, Y, Z))
add_in(s(X), Y, s(Z)) → U13(X, Y, Z, add_in(X, Y, Z))
add_in(0, X, X) → add_out(0, X, X)
add_in(X, 0, X) → add_out(X, 0, X)
U13(X, Y, Z, add_out(X, Y, Z)) → add_out(s(X), Y, s(Z))
U12(X, Y, Z, add_out(U, Y, Z)) → times_out(s(X), Y, Z)
U8(Y, X, times_out(U, Y, Z)) → U9(Y, X, neq_in(X, Z))
neq_in(s(X), s(Y)) → U10(X, Y, neq_in(X, Y))
neq_in(0, s(X)) → neq_out(0, s(X))
neq_in(s(X), 0) → neq_out(s(X), 0)
U10(X, Y, neq_out(X, Y)) → neq_out(s(X), s(Y))
U9(Y, X, neq_out(X, Z)) → not_divides_out(Y, X)
U5(X, Y, not_divides_out(s(s(Y)), X)) → U6(X, Y, pr_in(X, s(Y)))
pr_in(X, s(0)) → pr_out(X, s(0))
U6(X, Y, pr_out(X, s(Y))) → pr_out(X, s(s(Y)))
U4(X, pr_out(s(s(X)), s(X))) → prime_out(s(s(X)))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
QUOT_IN(s(X), s(Y), Z, U) → QUOT_IN(X, Y, Z, U)
QUOT_IN(X, 0, s(Z), s(U)) → QUOT_IN(X, s(Z), s(Z), U)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
QUOT_IN(X, 0, s(Z)) → QUOT_IN(X, s(Z), s(Z))
QUOT_IN(s(X), s(Y), Z) → QUOT_IN(X, Y, Z)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
U51(X, Y, not_divides_out(s(s(Y)), X)) → PR_IN(X, s(Y))
PR_IN(X, s(s(Y))) → U51(X, Y, not_divides_in(s(s(Y)), X))
prime_in(s(s(X))) → U4(X, pr_in(s(s(X)), s(X)))
pr_in(X, s(s(Y))) → U5(X, Y, not_divides_in(s(s(Y)), X))
not_divides_in(Y, X) → U7(Y, X, div_in(X, Y, U))
div_in(X, Y, Z) → U1(X, Y, Z, quot_in(X, Y, Y, Z))
quot_in(X, 0, s(Z), s(U)) → U3(X, Z, U, quot_in(X, s(Z), s(Z), U))
quot_in(s(X), s(Y), Z, U) → U2(X, Y, Z, U, quot_in(X, Y, Z, U))
quot_in(0, s(Y), s(Z), 0) → quot_out(0, s(Y), s(Z), 0)
U2(X, Y, Z, U, quot_out(X, Y, Z, U)) → quot_out(s(X), s(Y), Z, U)
U3(X, Z, U, quot_out(X, s(Z), s(Z), U)) → quot_out(X, 0, s(Z), s(U))
U1(X, Y, Z, quot_out(X, Y, Y, Z)) → div_out(X, Y, Z)
U7(Y, X, div_out(X, Y, U)) → U8(Y, X, times_in(U, Y, Z))
times_in(s(X), Y, Z) → U11(X, Y, Z, times_in(X, Y, U))
times_in(0, Y, 0) → times_out(0, Y, 0)
U11(X, Y, Z, times_out(X, Y, U)) → U12(X, Y, Z, add_in(U, Y, Z))
add_in(s(X), Y, s(Z)) → U13(X, Y, Z, add_in(X, Y, Z))
add_in(0, X, X) → add_out(0, X, X)
add_in(X, 0, X) → add_out(X, 0, X)
U13(X, Y, Z, add_out(X, Y, Z)) → add_out(s(X), Y, s(Z))
U12(X, Y, Z, add_out(U, Y, Z)) → times_out(s(X), Y, Z)
U8(Y, X, times_out(U, Y, Z)) → U9(Y, X, neq_in(X, Z))
neq_in(s(X), s(Y)) → U10(X, Y, neq_in(X, Y))
neq_in(0, s(X)) → neq_out(0, s(X))
neq_in(s(X), 0) → neq_out(s(X), 0)
U10(X, Y, neq_out(X, Y)) → neq_out(s(X), s(Y))
U9(Y, X, neq_out(X, Z)) → not_divides_out(Y, X)
U5(X, Y, not_divides_out(s(s(Y)), X)) → U6(X, Y, pr_in(X, s(Y)))
pr_in(X, s(0)) → pr_out(X, s(0))
U6(X, Y, pr_out(X, s(Y))) → pr_out(X, s(s(Y)))
U4(X, pr_out(s(s(X)), s(X))) → prime_out(s(s(X)))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
U51(X, Y, not_divides_out(s(s(Y)), X)) → PR_IN(X, s(Y))
PR_IN(X, s(s(Y))) → U51(X, Y, not_divides_in(s(s(Y)), X))
not_divides_in(Y, X) → U7(Y, X, div_in(X, Y, U))
U7(Y, X, div_out(X, Y, U)) → U8(Y, X, times_in(U, Y, Z))
div_in(X, Y, Z) → U1(X, Y, Z, quot_in(X, Y, Y, Z))
U8(Y, X, times_out(U, Y, Z)) → U9(Y, X, neq_in(X, Z))
U1(X, Y, Z, quot_out(X, Y, Y, Z)) → div_out(X, Y, Z)
times_in(s(X), Y, Z) → U11(X, Y, Z, times_in(X, Y, U))
times_in(0, Y, 0) → times_out(0, Y, 0)
U9(Y, X, neq_out(X, Z)) → not_divides_out(Y, X)
quot_in(X, 0, s(Z), s(U)) → U3(X, Z, U, quot_in(X, s(Z), s(Z), U))
quot_in(s(X), s(Y), Z, U) → U2(X, Y, Z, U, quot_in(X, Y, Z, U))
quot_in(0, s(Y), s(Z), 0) → quot_out(0, s(Y), s(Z), 0)
U11(X, Y, Z, times_out(X, Y, U)) → U12(X, Y, Z, add_in(U, Y, Z))
neq_in(s(X), s(Y)) → U10(X, Y, neq_in(X, Y))
neq_in(0, s(X)) → neq_out(0, s(X))
neq_in(s(X), 0) → neq_out(s(X), 0)
U3(X, Z, U, quot_out(X, s(Z), s(Z), U)) → quot_out(X, 0, s(Z), s(U))
U2(X, Y, Z, U, quot_out(X, Y, Z, U)) → quot_out(s(X), s(Y), Z, U)
U12(X, Y, Z, add_out(U, Y, Z)) → times_out(s(X), Y, Z)
U10(X, Y, neq_out(X, Y)) → neq_out(s(X), s(Y))
add_in(s(X), Y, s(Z)) → U13(X, Y, Z, add_in(X, Y, Z))
add_in(0, X, X) → add_out(0, X, X)
add_in(X, 0, X) → add_out(X, 0, X)
U13(X, Y, Z, add_out(X, Y, Z)) → add_out(s(X), Y, s(Z))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPOrderProof
U51(X, Y, not_divides_out) → PR_IN(X, s(Y))
PR_IN(X, s(s(Y))) → U51(X, Y, not_divides_in(s(s(Y)), X))
not_divides_in(Y, X) → U7(Y, X, div_in(X, Y))
U7(Y, X, div_out(U)) → U8(X, times_in(U, Y))
div_in(X, Y) → U1(quot_in(X, Y, Y))
U8(X, times_out(Z)) → U9(neq_in(X, Z))
U1(quot_out(Z)) → div_out(Z)
times_in(s(X), Y) → U11(Y, times_in(X, Y))
times_in(0, Y) → times_out(0)
U9(neq_out) → not_divides_out
quot_in(X, 0, s(Z)) → U3(quot_in(X, s(Z), s(Z)))
quot_in(s(X), s(Y), Z) → U2(quot_in(X, Y, Z))
quot_in(0, s(Y), s(Z)) → quot_out(0)
U11(Y, times_out(U)) → U12(add_in(U, Y))
neq_in(s(X), s(Y)) → U10(neq_in(X, Y))
neq_in(0, s(X)) → neq_out
neq_in(s(X), 0) → neq_out
U3(quot_out(U)) → quot_out(s(U))
U2(quot_out(U)) → quot_out(U)
U12(add_out(Z)) → times_out(Z)
U10(neq_out) → neq_out
add_in(s(X), Y) → U13(add_in(X, Y))
add_in(0, X) → add_out(X)
add_in(X, 0) → add_out(X)
U13(add_out(Z)) → add_out(s(Z))
not_divides_in(x0, x1)
U7(x0, x1, x2)
div_in(x0, x1)
U8(x0, x1)
U1(x0)
times_in(x0, x1)
U9(x0)
quot_in(x0, x1, x2)
U11(x0, x1)
neq_in(x0, x1)
U3(x0)
U2(x0)
U12(x0)
U10(x0)
add_in(x0, x1)
U13(x0)
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
PR_IN(X, s(s(Y))) → U51(X, Y, not_divides_in(s(s(Y)), X))
Used ordering: Polynomial interpretation [25]:
U51(X, Y, not_divides_out) → PR_IN(X, s(Y))
POL(0) = 0
POL(PR_IN(x1, x2)) = x2
POL(U1(x1)) = 0
POL(U10(x1)) = 0
POL(U11(x1, x2)) = 0
POL(U12(x1)) = 0
POL(U13(x1)) = 1 + x1
POL(U2(x1)) = 0
POL(U3(x1)) = 0
POL(U51(x1, x2, x3)) = 1 + x2
POL(U7(x1, x2, x3)) = 0
POL(U8(x1, x2)) = 0
POL(U9(x1)) = 0
POL(add_in(x1, x2)) = 1 + x1 + x2
POL(add_out(x1)) = 1
POL(div_in(x1, x2)) = 0
POL(div_out(x1)) = 0
POL(neq_in(x1, x2)) = 0
POL(neq_out) = 0
POL(not_divides_in(x1, x2)) = 0
POL(not_divides_out) = 0
POL(quot_in(x1, x2, x3)) = 0
POL(quot_out(x1)) = 0
POL(s(x1)) = 1 + x1
POL(times_in(x1, x2)) = 0
POL(times_out(x1)) = 0
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
U51(X, Y, not_divides_out) → PR_IN(X, s(Y))
not_divides_in(Y, X) → U7(Y, X, div_in(X, Y))
U7(Y, X, div_out(U)) → U8(X, times_in(U, Y))
div_in(X, Y) → U1(quot_in(X, Y, Y))
U8(X, times_out(Z)) → U9(neq_in(X, Z))
U1(quot_out(Z)) → div_out(Z)
times_in(s(X), Y) → U11(Y, times_in(X, Y))
times_in(0, Y) → times_out(0)
U9(neq_out) → not_divides_out
quot_in(X, 0, s(Z)) → U3(quot_in(X, s(Z), s(Z)))
quot_in(s(X), s(Y), Z) → U2(quot_in(X, Y, Z))
quot_in(0, s(Y), s(Z)) → quot_out(0)
U11(Y, times_out(U)) → U12(add_in(U, Y))
neq_in(s(X), s(Y)) → U10(neq_in(X, Y))
neq_in(0, s(X)) → neq_out
neq_in(s(X), 0) → neq_out
U3(quot_out(U)) → quot_out(s(U))
U2(quot_out(U)) → quot_out(U)
U12(add_out(Z)) → times_out(Z)
U10(neq_out) → neq_out
add_in(s(X), Y) → U13(add_in(X, Y))
add_in(0, X) → add_out(X)
add_in(X, 0) → add_out(X)
U13(add_out(Z)) → add_out(s(Z))
not_divides_in(x0, x1)
U7(x0, x1, x2)
div_in(x0, x1)
U8(x0, x1)
U1(x0)
times_in(x0, x1)
U9(x0)
quot_in(x0, x1, x2)
U11(x0, x1)
neq_in(x0, x1)
U3(x0)
U2(x0)
U12(x0)
U10(x0)
add_in(x0, x1)
U13(x0)